package com.xxg.renrenlogin.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 用户表dao
 *
 * @author xuxiaogang
 * @date 2021-12-02
 */
@Mapper
@Component
public interface RenrenShopUserDao {
    @Select("select id,username,group_id as groupId from renren_shop_user where is_deleted = 0")
    List<RenrenShopUser> getAllUserAccount();

    @Select("select id,username,group_id as groupId,password,salt from renren_shop_user where username = #{userName} and is_deleted = 0")
    RenrenShopUser selectByAccount(@Param("userName") String issuer);
}